<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>支付盒子策略设置</title>
		<link rel="stylesheet" type="text/css" href="css/clgl3.css"/>
	</head>
	<body>
		<div class="main_content">
			<div class="con_left">
				<div class="l-box">
					<a href="clgl.html">洗车机策略设置</a>
				</div>
				<div class="l-box">
					<a href="clgl2.html">售水机策略设置</a>
				</div>
				<div class="l-box in">
					<a href="clgl3.html">支付盒子策略设置</a>
				</div>
			</div>
			<div class="con_right fl">
				<div class="r_main">
				<div class="mask"></div>
				<div class="xiugai">
					<header>编辑支付盒子策略</header>
					<form action="" method="post">
						<div class="left-con">
							<ul>
								<li><span>默认策略:</span><input type="checkbox" checked=""/><span>(默认策略是唯一的)</span></li>
								<li><span>策略名称:</span><input type="text" placeholder="" id="input1" value="支付盒子默认策略"/><span style="color: red;display: none;">*</span></li>
								<li>
									<div class="group-radio">
										<div class="i-radio d-i-b">
										<span>通讯模式：</span>
											<div class="f-inp-r">
												<input type="radio" name="zhuangtai" checked="checked"/><i class="ii"></i>
											</div>
											<span>脉冲</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhuangtai"/><i></i>
											</div>
											<span>232</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhuangtai"/><i></i>
											</div>
											<span>485</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhuangtai"/><i></i>
											</div>
											<span>mdb</span>
										</div>
									</div>
								</li>
								<li>
									<span>上传投币间隔：</span>
									<input type="text" value="10" id="input2"/>
									<span>秒</span>
									<span style="color:red;display: none;">*</span>
									<span style="font-size: 12px;color: red;vertical-align: sub;display: none;">必须是正整数（10-255） 设定范围:10-255秒</span>
								</li>
								<li>
									<span>脉冲频率：</span>
									<input type="text" value="40" id="input3"/>
									<span>ms</span>
									<span style="color:red;display: none;">*</span>
									<span style="font-size: 12px;color: red;vertical-align: sub;display: none;">必须是正整数（20-200） 设定范围:20-200ms</span>
								</li>
								<li>
									<div class="group-radio">
										<div class="i-radio d-i-b">
										<span>正负脉冲：</span>
											<div class="f-inp-r">
												<input type="radio" name="zhengfumaichong" checked="checked"/><i class="ii"></i>
											</div>
											<span>负</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhengfumaichong"/><i></i>
											</div>
											<span>正</span>
										</div>
								</li>
								<li>
									<div class="group-radio">
										<div class="i-radio d-i-b">
										<span>单（多）脉冲：</span>
											<div class="f-inp-r">
												<input type="radio" name="danduomaichong" checked="checked"/><i class="ii"></i>
											</div>
											<span>单</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="danduomaichong"/><i></i>
											</div>
											<span>多</span>
										</div>
									</div>
								</li>
								<li><div class="group-radio">
										<div class="i-radio d-i-b">
										<span>脉冲支付单位：</span>
											<div class="f-inp-r">
												<input type="radio" name="zhifudanwei" checked="checked"/><i class="ii"></i>
											</div>
											<span>元</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhifudanwei"/><i></i>
											</div>
											<span>角</span>
										</div>
										<div class="i-radio d-i-b">
											<div class="f-inp-r">
												<input type="radio" name="zhifudanwei"/><i></i>
											</div>
											<span>分</span>
										</div>
									</div>
								</li>
							</ul>
							<input type="submit" name="" id="" value="应用" />
							<input type="button" name="" id="back" value="返回" onclick="window.location.href='clgl3.html'" />
						</div>
					</form>
				</div>
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(':submit').on('click',function(){
					$('#input1').nextAll().eq(0).css('display','none');
					$('#input2').nextAll().eq(1).css('display','none');
					$('#input2').nextAll().eq(2).css('display','none');
					$('#input3').nextAll().eq(1).css('display','none');
					$('#input3').nextAll().eq(2).css('display','none');
				
				
				var input1=$.trim($('#input1').val());
				var input2=$.trim($('#input2').val());
				var input3=$.trim($('#input3').val());
				
				
				
				if(!input1){
					$('#input1').nextAll().eq(0).css('display','inline-block');
					return false;
				}else if(!input2){
					$('#input2').nextAll().eq(1).css('display','inline-block');
					return false;
				}else if(!$.isNumeric(input2)){
					$('#input2').nextAll().eq(2).css('display','inline-block');
					return false;
				}else if(input2>255||input2<10){
					$('#input2').nextAll().eq(2).css('display','inline-block');
					return false;
				}else if(!input3){
					$('#input3').nextAll().eq(1).css('display','inline-block');
					return false;
				}else if(!$.isNumeric(input3)){
					$('#input3').nextAll().eq(2).css('display','inline-block');
					return false;
				}else if(input3>200||input3<20){
					$('#input3').nextAll().eq(2).css('display','inline-block');
					return false;
				}
			})
		</script>
	</body>
</html>
